
<%= "addResoult" %>
<h1>Nowy wynik badania</h1>

<% form_for(@exam_resoult) do |f| %>
  <%= f.error_messages %>
  <p>
    Typ badania: <%=@exam_resoult.order_examination.examination_type.name %>
  </p>
  <p>
    <%= f.label :description %><br />
    <%= f.text_field :description %>
  </p>
  <p>
    <%for param_resoult in @exam_resoult.param_resoults%>
      <%fields_for "temp_examination_resoult[param_resoult_attributes][]", param_resoult do |param_resoult_form| %>

        <p>
          <%=param_resoult.param_norm.name%>:
          <br/>
          Wynik: <%= param_resoult_form.text_field :resoult %>
        </p>
        <p>
          Opis: <%= param_resoult_form.text_field :description %>
        </p>
         <%=  param_resoult_form.hidden_field :param_norm_id%>
      <% end %>
  <% end %>
  </p>
  <p>
    <%= f.submit 'Create' %>
  </p>
<% end %>

<%= link_to 'Back', order_examinations_path %>